﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<#import "/spring.ftl" as spring/>
<#assign id=command.id/>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
  <title>Service</title>
</head>

<body>
    <form method="post" action="service.studio">
        <@spring.bind "command.taskId"/>
        Task: &nbsp;
        <select name="taskId">
            <option value="0">&nbsp;</option>
            <#list tasks as task>
            <#assign selected = false/>
            <#if task.id==spring.status.value>
                <#assign selected = true/>
            </#if>
            <option value="${task.id}" <#if selected>selected="selected"</#if>>${task.name} - ${task.code}</option>
            </#list>
        </select><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <@spring.bind "command.photoSizeId"/>
        Photo Size: &nbsp;
        <select name="photoSizeId">
            <option value="0">&nbsp;</option>
            <#list photoSizes as ps>
            <#assign selected = false/>
            <#if ps.id==spring.status.value>
                <#assign selected = true/>
            </#if>
            <option value="${ps.id}" <#if selected>selected="selected"</#if>>${ps.name}</option>
            </#list>
        </select><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <@spring.bind "command.price"/>
        Price: &nbsp; <input type="text" name="price" maxlength="12" value="${spring.status.value!}"/><br />
        <#if spring.status.errorMessage?has_content>
            <span style="color: #FF0000">${spring.status.errorMessage}</span><br />
		</#if>
        <input type="hidden" name="id" value="${id}"/>
        <#if id lte 0>
        <input type="hidden" name="action" value="0"/>
        <input type="submit" value="Save"/>
        <#else>
        <input type="hidden" name="action" value="1"/>
        <input type="submit" value="Update"/>
        </#if>
    </form>
</body>

</html>
